import { init } from 'snabbdom/build/package/init'
import { h } from 'snabbdom/build/package/h'

const patch = init([])

let app = document.querySelector('#app')

let vnode = h('div#container', [h('h1', 'Hello h1'), h('p', 'Hello p')])

let vnode_1 = patch(app, vnode)

setTimeout(() => {
  // vnode = h('div#container', 'Hello again')
  // patch(vnode_1, vnode)
  vnode = h('!') // 移除元素
  patch(vnode_1, vnode)
}, 1000 * 2)
